package com.leo.foodmaster.ureport2.controller;

import com.bstek.ureport.export.html.HtmlReport;
import com.leo.foodmaster.commons.entity.Result;
import com.leo.foodmaster.ureport2.service.IPurchaseBillReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * <p>
 * 采购清单报表Controller
 * </p>
 *
 * @author ：Leo
 * @since ：2021/10/16 11:47
 */
@RestController
@Api(tags = "采购清单报表")
@RequestMapping("ureport2")
public class PurchaseBillReportController {
    @Resource
    private IPurchaseBillReportService purchaseBillReportService;

    @ApiOperation(value = "查询采购清单Html")
    @GetMapping("/getPurchaseBillHtml")
    public Result<Object> getPurchaseBillHtml(@ApiParam("采购清单Id") @RequestParam Long purchaseBillId) {
        HtmlReport htmlReport = purchaseBillReportService.getPurchaseBillHtml(purchaseBillId);
        return Result.success(htmlReport);
    }
}
